package com.dnjn.happiness.biz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dnjn.happiness.biz.domain.Appraise;
import com.dnjn.happiness.biz.domain.vo.StatisticalAnalysisAppriseVO;
import com.dnjn.happiness.biz.domain.vo.StatisticalAnalysisVO;
import com.dnjn.happiness.common.core.model.ModelHappinessScores;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 评价表 Mapper 接口
 * </p>
 *
 * @author Amber
 * @since 2023-10-04
 */
public interface AppraiseMapper extends BaseMapper<Appraise> {

    List<ModelHappinessScores> getAppraiseHappinessScores(@Param("userId") Long userId, @Param("tableName") String tableName);

    Page<Appraise> selectPageX(@Param("po") Appraise appraise, Page page);

    Page<StatisticalAnalysisVO> selectStatisticalAnalysisApprise(@Param("dto") StatisticalAnalysisAppriseVO vo, Page page);


    List<StatisticalAnalysisVO> AnalysisPage(Page<Object> happiness_score);

    List<StatisticalAnalysisVO> ListPageSerchX(StatisticalAnalysisAppriseVO vo, Page<Object> happiness_score);


    Double getHappinessScoresViewAppriseNew(@Param("userId") Long userId, @Param("base_percent") Double base_percent, @Param("x") Double x);

    Page<Appraise> getAppraisePageByFromUserId(@Param("po") Appraise domain, @Param("page") Page page);

    List<Appraise> queryAppraiseListByUserId(Appraise appraise);

    Page<Appraise> selectPageNew(@Param("po") Appraise appraise, @Param("page") Page page);

    List<Appraise> getAppraiseRecords(@Param("userId") Long userId, @Param("time") String time);
}
